package sortingRMI_client;

@SuppressWarnings({"rawtypes","unchecked"})
public class PreSortChecker {
	public Comparable[] sortList;

		public static boolean checkSort(Comparable[] arrayToBeSorted) {
			int placeHolder;
			int arrayCompareBoundary = arrayToBeSorted.length;
			boolean preSortedReturn = true;
			
			for (placeHolder = 1; placeHolder < arrayCompareBoundary ; placeHolder++) {
				if (arrayToBeSorted[placeHolder-1].compareTo(arrayToBeSorted[placeHolder]) > 0) {
					preSortedReturn = false;
				}
			}
			return preSortedReturn;
		}
}